package br.com.massai.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "URL", schema = "PORTAL")
@SequenceGenerator(name = "seqUrl", sequenceName = "seq_url", allocationSize = 1)
public class Url implements Serializable {

	private static final long serialVersionUID = 8032284540757760664L;

	@Id
	@Column(name = "ID_URL")
	@GeneratedValue(generator = "seqUrl", strategy = GenerationType.SEQUENCE)
	private Long id;

	@Column(name = "CAMINHO", nullable = false, columnDefinition = "VARCHAR2(1000)")
	private String caminho;

	@ManyToOne
	@JoinColumn(name = "ID_PRIVILEGIO", referencedColumnName = "ID_PRIVILEGIO")
	private Privilegio privilegio;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCaminho() {
		return caminho;
	}

	public void setCaminho(String caminho) {
		this.caminho = caminho;
	}

	public Privilegio getPrivilegio() {
		return privilegio;
	}

	public void setPrivilegio(Privilegio privilegio) {
		this.privilegio = privilegio;
	}
}
